<extend name="Public/common" />
<block name="body">
<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <h3>商品管理</h3>
      <ul class="tab-base">
        <li><a href="JavaScript:void(0);" class="current"><span>列表</span></a></li>
        <li><a href="{:U('add')}" ><span>新增</span></a></li>
      </ul>
    </div>
  </div>
  <div class="fixed-empty"></div>
  <form method="get" action="{:U()}" name="form_search">
    <table class="tb-type1 noborder search">
      <tbody>
        <tr>
          <th><label for="keyword">关键字</label></th>
          <td><input type="text" value="<notempty name="get.keyword">{$get['keyword']}</notempty>" name="keyword" id="keyword" class="txt"></td>
          <th><label for="goods_sn">货号</label></th>
          <td><input type="text" value="<notempty name="get.goods_sn">{$get['goods_sn']}</notempty>" name="goods_sn" id="goods_sn" class="txt" /></td>
          <th><label>商户</label></th>
          <td id="store_id" colspan="8">
            <select class="querySelect" name="store_id">
              <option value="">请选择...</option>
		      <notempty name="store">
		      <volist name="store" id="vo">
              <option <notempty name="get.store_id"><eq name="get.store_id" value="$key">selected='selected'</eq></notempty> value="{$key}">{$vo}</option>
              </volist>
              </notempty>
            </select></td>
          <td>
          	<a href="javascript:document.form_search.submit();" class="btn-search " title="查询">&nbsp;</a>
            <if condition="!empty($get['keyword']) || !empty($get['goods_sn']) || !empty($get['store_id'])">
            <a href="{:U('index')}" class="btns " title="撤销检索"><span>撤销检索</span></a>
            </if>
          </td>
        </tr>
      </tbody>
    </table>
  </form>
<table class="table tb-type2" id="prompt">
	<tbody>
		<tr class="space odd">
			<th colspan="12"><div class="title"><h5>操作提示</h5><span class="arrow"></span></div></th>
		</tr>
		<tr>
			<td><ul>
				<li>商品列表</li>
				</ul></td>
		</tr>
	</tbody>
</table>
	<form method="post" id="form1">
    <table class="table tb-type2">
      <thead>
        <tr class="thead">
          <th class="w24"></th>
          <th class="w48 align-center">ID</th>
          <th class="w48 align-center">货号</th>
          <th colspan="2">商品名称</th>       
          <th class="w84 align-center">市场价</th>
          <th class="w84 align-center">堂食价</th>
          <th class="w84 align-center">会员价</th>
          <th class="w84 align-center">状态</th>
          <th class="w84 align-center">操作</th>
        </tr>
      </thead>
      <tbody>
        <notempty name="list">
        <volist name="list" id="vo">
        <tr class="hover">
          <td><input type="checkbox" name='id[]' value="{$vo['goods_id']}" class="checkitem"></td>
          <td class="align-center">{$vo['goods_id']}</td>
          <td class="align-center">{$vo['goods_sn']}</td>
          <td class="w60 picture"><div class="size-56x56"><span class="thumb size-56x56"><i></i><img src="{$vo['goods_thumb']}" onload="javascript:DrawImage(this,56,56);"/></span></div></td>
          <td class="goods-name">
            <p><span>{$vo['goods_name']}</span></p>
            <p class="store">查看量:{$vo['goods_click']}&nbsp;&nbsp;销售量:{$vo['goods_sale']}</p>
          </td>
          <td class="align-center">{$vo['market_price']}</td>
          <td class="align-center">{$vo['shop_price']}</td>
          <td class="align-center">{$vo['member_price']}</td>
          <td class="align-center yes-onoff">
          <eq name="vo.status" value="1">
          	<a href="JavaScript:void(0);" class=" enabled" ajax_branch='state' nc_type="inline_edit" fieldname="status" fieldid="{$vo['goods_id']}" fieldvalue="1"  title="出售中"><img src="__IMG__/transparent.gif"></a>
          <else />
            <a href="JavaScript:void(0);" class=" disabled" ajax_branch='state' nc_type="inline_edit" fieldname="status" fieldid="{$vo['goods_id']}" fieldvalue="2" title="下架"><img src="__IMG__/transparent.gif"></a>
          </eq>
          </td>
          <td class="align-center">
          	<a href="{:U('edit?id='.$vo['goods_id'])}">编辑</a> | 
          	<a href="javascript:if(confirm('您确定要删除吗'))window.location = '{:U('delete?id='.$vo['goods_id'])}';">删除</a>
          </td>
        </tr>
        </volist>
        <else />
        <tr class="no_data">
          <td colspan="10">没有符合条件的记录</td>
        </tr>
        </notempty>
      </tbody>
      <tfoot>
        <tr class="tfoot">
        <notempty name="page">
          <td><input type="checkbox" class="checkall" id="checkallBottom"></td>
          <td colspan="16"><label for="checkallBottom">全选</label>
            &nbsp;&nbsp;<a href="JavaScript:void(0);" class="btn" onclick="if(confirm('您确定要删除吗?')){$('#form1').submit();}"><span>删除</span></a>
            <div class="pagination"> {$page} </div></td>
         <else />  
          <td colspan="16"></td>
         </notempty>
        </tr>
      </tfoot>
    </table>
  </form>
</div>
<script type="text/javascript" src="__JS__/jquery.edit.js" charset="utf-8"></script>
</block>